<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
            "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>Branch Elements - Screenbar Documentation</title>
	<link rel="stylesheet" type="text/css" media="screen" href="style.css">
</head>
<body>

<H1>Branch Elements</H1>

<P>A branch element changes between several elements, depending on the state of
objects (windows, desks, monitors) in the context where it appears, and on
Litestep variables. A branch element is one of the elements listed in
(prefix)Branches. For each of those elements, (element-name)Condition is a
boolean expression which defines when it should be used. If several conditions
are satisfied, the first element whose conditions are satisfied is the one
used. If no condition is specified for an element, that element is always used
unless the conditions are met for an element which appears before it.</P>

<div id="configoption">
	Branch elements inherit <a href="layout.html#common">common layout options</a>.
</div>

<div id="configoption" name="prefixBranches">
	<a name="prefixBranches"/>
	<div id="prototype">(prefix)Branches [element-list]</div>
	<div id="defaultval">Mandatory Setting</div>
	<div id="appliesto">Applies to: Branch elements</div>
	<div id="description">
		A list of the possible elements this branch element may be rendered as.
		The first of the elements listed whose condition is fulfilled will be
		used.
	</div>
</div>

<div id="configoption" name="prefixCondition">
	<a name="prefixCondition"/>
	<div id="prototype">(prefix)Condition [boolean-expr]</div>
	<div id="defaultval">Default: true</div>
	<div id="appliesto">Applies to: Children of branch elements</div>
	<div id="description">
		The condition under which this element will be used.
	</div>
</div>

<H2>Boolean Expressions</H2>

<P>Condition expressions may use the &amp; (and), | (or), and ! (not)
operators, boolean RC variables (which are considered false if not defined),
plus the following keywords:</P>

<ul id="namelist">
<li id="namelistitem">
	<div id="itemname">minimized</div>
	<div id="itemdesc">
		True if the context task is minimized.
	</div>
</li>
<li id="namelistitem">
	<div id="itemname">flashing</div>
	<div id="itemdesc">
		True if the context task is flashing for attention.
	</div>
</li>
<li id="namelistitem">
	<div id="itemname">focused</div>
	<div id="itemdesc">
		True if the context task's main window is focused, or if there is no
		context task and the context desk is focused.
	</div>
</li>
<li id="namelistitem">
	<div id="itemname">deskfocused</div>
	<div id="itemdesc">
		True if the context desk is focused on any monitor.
	</div>
</li>
<li id="namelistitem">
	<div id="itemname">thismonitor</div>
	<div id="itemdesc">
		True if the context desk is displayed on the same monitor as the panel.
	</div>
</li>
<li id="namelistitem">
	<div id="itemname">true, false</div>
	<div id="itemdesc">
		The literal values true and false.
	</div>
</li>
<li id="namelistitem">
	<div id="itemname">dragging</div>
	<div id="itemdesc">
		True if any element is currently being dragged
	</div>
</li>
<li id="namelistitem">
	<div id="itemname">hovered</div>
	<div id="itemdesc">
		True if the cursor is over this element
	</div>
</li>
<li id="namelistitem">
	<div id="itemname">vertical</div>
	<div id="itemdesc">
		True if this panel is vertical ((prefix)Vertical or an appbar on the
		left or right edge of the screen)
	</div>
</li>
<li id="namelistitem">
	<div id="itemname">windowhovered</div>
	<div id="itemdesc">
		True if the cursor is over a window belonging to the context task
	</div>
</li>
</ul>

<P>Litestep variables used in conditions are read once, on initialization, unless
(prefix)UpdateVars [bool] is set to true (default false), in which case they
update every time the layout is checked for changes. Operators in branch
condition expressions are right-associative; &amp; and | have the same
precedence, but may be parenthesized.</P>

<div id="navigation">
	<a href="layout.html">Previous Page</a>
	<a href="index.html">Index</a>
	<a href="flow.html">Next Page</a>
</div>

</body>
</html>
